import test1.Demo1.Person;

import java.util.Arrays;
import java.util.Date;
import java.util.Scanner;

//导入所有类（原理并不是全导入，而是用到哪个自动导哪个）
//不推荐，容易冲突
//import java.sql.*;

//mport static java.lang.Math.*;

/**
 * ClassName NewKnowledge
 * Description TODO
 * Author Yanyan
 * Date 2025/11/8 19:06
 * Version 1.0
 */
public class NewKnowledge {
    public static void main(String[] args) {
        double x = 30;
        double y = 40;
        double result = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));

        //静态导入的方法可以使代码更简单，但是不推荐
        //double result = sqrt(pow(x, 2) + pow(y, 2));

        System.out.println(result);
    }


    public static void main1(String[] args) {
        Person person1 = new Person();
        person1.eat();
        System.out.println(person1);

        Person person2 = new Person();
        person2.setName("abc");
        person2.setAge(10);
        System.out.println(person2);

        int[] array = {1, 2, 3, 4, 5};
        System.out.println(Arrays.toString(array));

        Scanner scanner = new Scanner(System.in);

        Date date = new Date(100);

    }
}
